/*
 * IOrderModel.java
 * business
 *
 * Created by ChenTao on 2017/3/2.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.model;

import com.yidiandao.business.data.bean.AfterSaleBean;
import com.yidiandao.business.data.bean.Goods;
import com.yidiandao.business.data.response.AfterSaleProgressResponse;
import com.yidiandao.business.data.response.OrderDetailResponse;
import com.yidiandao.business.data.response.RecommendGoodsListResponse;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.view.AfterSaleInfoLayout;

import java.util.List;

/**
 * 我的订单
 */
public interface IOrderModel {

    /**
     * 我的订单
     */
    void getOrderInfo(String tag, int state, int page, onAccessNetSuccessListener listener);

    /**
     * 退换货
     */
    void getExchangeInfo(String tag, int page, onAccessNetSuccessListener listener);

    /**
     * 订单详情
     */
    void getOrderDetailInfo(String tag, String orderID, onGetOrderDetailSuccessListener listener);

    /**
     * 取消订单
     */
    void cancelOrder(String tag, String orderID, String reason, onAccessNetListener listener);

    void sendZXingResult(String tag, String result, onAccessNetListener listener);

    /**
     * 申请售后界面的信息
     */
    void getAfterSaleInfo(String tag, String result, onGetAfterSaleNetListener listener);

    /**
     * 需要申请售后的信息
     */
    List<AfterSaleBean> sendExchangeInfo(
            AfterSaleInfoLayout infoLayout, String orderId, List<Goods> goodsList);

    /**
     * 上传申请售后的信息
     */
    void sendAfterSaleInfoToNet(String tag, String info, onAccessNetListener listener);

    /**
     * 查看售后进度
     */
    void getAfterSaleProgress(String tag, String orderID, onGetAfterSaleProgressListener listener);

    /**
     * 确认收货
     */
    void confirmReceive(String tag, String orderId, onAccessNetListener listener);

    /**
     * 再次购买
     *
     * @param orderId orderId
     */
    void buyAgain(String orderId, String tag, OnBuyAgainListener listener);

    /**
     * 订单跟踪
     */
    void getLogisticsInfo(String orderId, String tag, onGetDataListener listener);

    /**
     * 获取订单推荐商品列表
     */
    void loadOrderRecommendGoods(String tag, OnLoadRecommendGoodsListener listener);

    /**
     * 获取大于14天没收货的订单数量
     */
    void getUnGetGoodsCount(String tag, OnLoadUnGetGoodsListener listener);

    void onlinePay(String tag, String orderId, OnLinePayListener listener);

    interface onAccessNetSuccessListener {

        void onSuccess(List<DisplayListItem> displayListItems, int total);

        void onFailed();

        void onFinal();
    }

    interface onGetOrderDetailSuccessListener {
        void onSuccess(
                List<DisplayListItem> displayListItems,
                int total,
                OrderDetailResponse.Data data);

        void onFailed();

        void onFinal();
    }

    interface onAccessNetListener {

        void onSuccess();

        void onFinal();
    }

    interface onGetAfterSaleNetListener {
        void onSuccess(List<Goods> data);

        void onFinal();

        void onFailed();
    }

    interface onGetAfterSaleProgressListener {

        void onSuccess(AfterSaleProgressResponse.DataBean data);

        void onFinal();

        void onFailed();
    }

    interface OnBuyAgainListener {

        void onSuccess(String recJson);

        void onFailed();

        void onFinal();
    }

    interface onGetDataListener {
        void onSuccess(List<DisplayListItem> displayListItems);

        void onFailed();

        void onFinal();
    }

    interface OnLoadRecommendGoodsListener {

        void onSuccess(RecommendGoodsListResponse.Data data);

        void onFailed();
    }

    interface OnLoadUnGetGoodsListener {

        void onSuccess(int count);

    }

    interface OnLinePayListener {
        void onSuccess(String url);

        void onFinal();
    }

}
